package com.xinfan.io.homework;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

/**
 * @Author xin
 * @Date 2022/6/9 14:55
 * @Version 1.0
 */
public class Homework4 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        String src = "G:\\桌面\\dog.dat";

        ObjectInputStream ois = new ObjectInputStream(new FileInputStream(src));

        Object object = ois.readObject();
        System.out.println(object);

        //关闭流
        ois.close();
    }
}
